
//  JQFYMessageViewController.m
//  JQFY
//
//  Created by apple on 2017/10/23.
//  Copyright © 2017年 yannis. All rights reserved.
//

#import "JQFYMessageViewController.h"
#import "JQFYTicketInfo_ViewController.h"

@interface JQFYMessageViewController ()

@end

@implementation JQFYMessageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupUI];
}

-(void)setupUI{
    self.title = @"消息";
    UIFont *font = [UIFont fontWithName:@"Verdana-Bold" size:20];
    NSDictionary *dic = @{NSFontAttributeName:font,
                          NSForegroundColorAttributeName: [UIColor whiteColor]};
    self.navigationController.navigationBar.titleTextAttributes =dic;
    UIImage *leftImg = [UIImage imageNamed:@"ticketInfo_back"];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:leftImg style:UIBarButtonItemStylePlain target:self action:@selector(didClickBack)];
    
//    EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithText:@"要发送的消息"];
//    NSString *from = [[EMClient sharedClient] currentUsername];

//    //生成Message
//    EMMessage *message = [[EMMessage alloc] initWithConversationID:[JQFYUserData userDataInSandbox].loginName from:from to:_groupId body:body ext:nil];
//    message.chatType = EMChatTypeGroupChat;// 设置为群聊消息
    
//    self.showRefreshFooter = YES;
}


//点击返回键
-(void)didClickBack
{
//    [self.navigationController popToRootViewControllerAnimated:YES];
    NSMutableArray *mutableArray = self.navigationController.viewControllers.mutableCopy;
    if (mutableArray.count > 3) {
        [mutableArray removeObjectAtIndex:mutableArray.count - 2];
    }
    self.navigationController.viewControllers = mutableArray.copy;
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
}




@end
